<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <title>水院报修</title>
    <meta name="description" content="">
    <meta name="HandheldFriendly" content="True">
    <meta name="MobileOptimized" content="320">
    <meta name="viewport" content="width=device-width, initial-scale=1, minimal-ui, user-scalable=no">
    <meta http-equiv="cleartype" content="on">
    <meta name="format-detection" content="telephone=no">
    <link rel="stylesheet" href="/assets/repairnew/statistics/css/style.css">
    <link rel="stylesheet" href="/assets/repairnew/statistics/css/mobiscroll.custom-3.0.0-beta2.min.css">
</head>
<body>
<div class="wrapper">
    <div class="header flex content">
        <a href="http://hqc.zjweu.edu.cn/microhome_f1008/classic/html/index.html" class="iconfont icon-zuo white"></a>
        <div class="Data">
            <input type="text" class="data text-center font-16 " id="demo" placeholder="{BEESCRM:$ntime}">
            <div class="kongbai"></div>
        </div>
        <a class="iconfont icon-rili"></a>
    </div>
    <div class="content padding-0">
        <div class="main padding-8-12 flex">
            <div>维修订单</div>
            <div class="flex">
                <div class="gray2 margin-r12 screen-text"><if condition="$pram eq 1">全部<elseif condition="$pram eq 2"/>生活区<else />教学区</if></div>
                <a class="iconfont icon-quyu pull-right green"></a>
            </div>
        </div>
        <div class="main padding-8-12">
            <div id="container1" style="min-width:300px;height:200px"></div>
            <div class="Blank flex ablank" style="display:none">
            <p >暂无数据</p>
        </div>
        </div>
    </div>
    <div class="content padding-0">
        <a href="{BEESCRM::U('Repairnew/repairnew/workload',array('repairId'=>$repair_id,'pram'=>$pram,'ntime'=>$ntime))}" class="main padding-8-12 active cwork">
            <span>工作量</span><span  class="iconfont icon-gengduo pull-right gray"></span>
        </a>
        <div class="main padding-8-12">
            <div id="container2" style="min-width:300px;height:200px"></div>
               <div class="Blank flex bblank" style="display:none">
            <p >暂无数据</p>
        </div>
        </div>
    </div>
    <div class="content padding-0">
        <a href="{BEESCRM::U('Repairnew/repairnew/workstar',array('repairId'=>$repair_id,'pram'=>$pram,'ntime'=>$ntime))}" class="main padding-8-12 active cping">
            <span>服务评分</span><span  class="iconfont icon-gengduo pull-right gray"></span>
        </a>
        <div class="main padding-8-12">
            <div id="container3" style="min-width:300px;height:200px"></div>
               <div class="Blank flex cblank" style="display:none">
            <p >暂无数据</p>
        </div>

        </div>
    </div>
    <div class="content padding-0">
        <a href="{BEESCRM::U('Repairnew/repairnew/BuildingDetails',array('repairId'=>$repair_id,'pram'=>$pram,'ntime'=>$ntime))}" class="main padding-8-12 active crepa">
            <span>维修报修（单）</span><span  class="iconfont icon-gengduo pull-right gray"></span>
        </a>
        <div class="main padding-8-12 flex">
            <div style="width:25%;">
                <div id="container4" style="width:100%; height: 100px;"></div>
                <p class="text-center gray2 font-12"><if condition="$allorder_list[0]['community_type'] eq 暂无数据">暂无数据<else/>{BEESCRM:$allorder_list[0]['community_type']}<br/>{BEESCRM:$allorder_list[0]['building_id']}</if></p>
            </div>
            <div style="width:25%;">
                <div id="container5" style="width:100%; height: 100px;"></div>
                <p class="text-center gray2 font-12"><if condition="$allorder_list[1]['community_type'] eq 暂无数据">暂无数据<else/>{BEESCRM:$allorder_list[1]['community_type']}<br/>{BEESCRM:$allorder_list[1]['building_id']}</if></p>
            </div>
            <div style="width:25%;">
                <div id="container6" style="width:100%; height: 100px;"></div>
                <p class="text-center gray2 font-12"><if condition="$allorder_list[2]['community_type'] eq 暂无数据">暂无数据<else/>{BEESCRM:$allorder_list[2]['community_type']}<br/>{BEESCRM:$allorder_list[2]['building_id']}</if></p>
            </div>
            <div style="width:25%;">
                <div id="container7" style="width:100%; height: 100px;"></div>
                <p class="text-center gray2 font-12"><if condition="$allorder_list[3]['community_type'] eq 暂无数据">暂无数据<else/>{BEESCRM:$allorder_list[3]['community_type']}<br/>{BEESCRM:$allorder_list[3]['building_id']}</if></p>
            </div>
            <!--   <div class="Blank flex ">
            <p >暂无数据</p>
        </div>-->
        </div>
    </div>
    <div class="pop-box hide">
        <div class="pop-hint">
            <div class="text-center list" data-id="1">全部</div>
            <div class="text-center list" data-id="2">生活区</div>
            <div class="text-center list" data-id="3">教学区</div>
        </div>
    </div>
    <input name="scou" id="scou" type="hidden" value="{BEESCRM:$count_list[0]['cid']}">
    <input name="jcou" id="jcou" type="hidden" value="{BEESCRM:$count_list[1]['cid']}">
    <input name="alltop_list" id="alltop_list" type="hidden" value='{BEESCRM:$alltop_list|json_encode}'>
    <input name="sorder_star" id="sorder_star" type="hidden" value='{BEESCRM:$sorder_star|json_encode}'>
    <input name="allorder_list" id="allorder_list" type="hidden" value='{BEESCRM:$allorder_list|json_encode}'>
</div>
</body>
<script src="/assets/repairnew/statistics/js/jquery-2.1.0.min.js"></script>
<script src="/assets/repairnew/statistics/js/highcharts.js"></script>
<script src="/assets/repairnew/statistics/js/highcharts-more.js"></script>
<script src="/assets/repairnew/statistics/js/solid-gauge.js"></script>
<script src="/assets/repairnew/statistics/js/charts.js"></script>
<script src="/assets/repairnew/statistics/js/mobiscroll.custom-3.0.0-beta2.min.js"></script>
<script>
	var gb_time = '{BEESCRM:$ntime}';
    var pram = '{BEESCRM:$pram}';
 
 $(document).ready(function(){
 	if('{BEESCRM:$ccount}' == 1){
 		$("#container1").hide();
 		$(".ablank").show();
 	};

 	if('{BEESCRM:$count_alltop}' == 1){
 		$("#container2").hide();
 		$(".bblank").show();
 	};
 	
 	if('{BEESCRM:$count_sorder}' == 1){
 		$("#container3").hide();
 		$(".cblank").show();
 	};

 })
    $('.icon-rili').click(function () {
        $('#demo').click();
    })
    $('#demo').mobiscroll().date({
        theme: 'android-holo-light',//皮肤样式
        lang: 'zh',//中文
        display: 'bottom',//位于底部
        dateFormat: 'yyyy-mm'//格式
    });

    $('.icon-quyu').click(function () {
        $('.pop-box').removeClass('hide');
    })
    $('.pop-box').click(function () {
        $(this).addClass('hide');
    })

    $('.pop-hint').on('click','.list',function () {
        var text=$(this).text();
        $('.screen-text').text("");
        $('.screen-text').append(text);
        $('.pop-box').addClass('hide');
    })

    //改变日期
    $("#demo").change(function(){
    	gb_time = $("#demo").val();    
    	zxajax(gb_time,pram);
	});
	
    //不同区域的切换
    $('.list').click(function () {
        pram = $(this).data('id');    
        zxajax(gb_time,pram);
    })

    function zxajax(gb_time,pram){
		    $.ajax({
			        url:"/repairnew/repairnew/dataDetail/repairId/"+{BEESCRM:$repair_id},
			        type:"post",
			        dataType:'json',
			        data:"pram="+pram+"&gb_time="+gb_time,
			        success:function(res){			        			        	
			        	$("#alltop_list").val(JSON.stringify(res['stop_list']));
			        	$("#sorder_star").val(JSON.stringify(res['sorder_star']));
			        	$("#allorder_list").val(JSON.stringify(res['sorder_list']));
			        	$("#scou").val(res['count_list'][0]['cid']);
			        	$("#jcou").val(res['count_list'][1]['cid']);
			        	//暂无数据的显示与隐藏
			        	
						if(res.ccount == 1){
							$("#container1").hide();
							$(".ablank").show();
						}else{
							$("#container1").show();
							$(".ablank").hide();
						};
						if(res.count_stop == 1){
							$("#container2").hide();
							$(".bblank").show();
						}else{
							$("#container2").show();
							$(".bblank").hide();
						};
						if(res.count_sorder == 1){
							$("#container3").hide();
							$(".cblank").show();
						}else{
							$("#container3").show();
							$(".cblank").hide();
						};
			        	
			        	$("#container4").siblings("p").html(res['sorder_list'][0]['community_type']+'<br>'+res['sorder_list'][0]['building_id']);
			        	$("#container5").siblings("p").html(res['sorder_list'][1]['community_type']+'<br>'+res['sorder_list'][1]['building_id']);
			        	$("#container6").siblings("p").html(res['sorder_list'][2]['community_type']+'<br>'+res['sorder_list'][2]['building_id']);
			        	$("#container7").siblings("p").html(res['sorder_list'][3]['community_type']+'<br>'+res['sorder_list'][3]['building_id']);
			        	$.getScript("/assets/repairnew/statistics/js/charts.js");
			        	$(".cwork").attr('href',"{BEESCRM::U('Repairnew/repairnew/workload')}/repairId/"+res.repair_id+"/pram/"+pram+"/ntime/"+gb_time);
			        	$(".cping").attr('href',"{BEESCRM::U('Repairnew/repairnew/workstar')}/repairId/"+res.repair_id+"/pram/"+pram+"/ntime/"+gb_time);
			        	$(".crepa").attr('href',"{BEESCRM::U('Repairnew/repairnew/BuildingDetails')}/repairId/"+res.repair_id+"/pram/"+pram+"/ntime/"+gb_time);
			        }
			}) 
    }
</script>
</html> 